﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A59字符串练习
{
    class Program
    {
        static void Main(string[] args)
        {
            Student[] students = new Student[3];

            for (int i = 0; i < students.Length; i++)
            {
                Console.WriteLine("请输入学生信息以录入:");
                string input = Console.ReadLine();
                string[] arr = input.Split(' ');
                //创建对象
                Student s = new Student(arr[0],int.Parse(arr[1]), int.Parse(arr[2]));
                //放进数组
                students[i] = s;
            }

            Console.WriteLine("\r\n您刚刚录入是一下学生信息:");

            foreach (var item in students)
            {
                Console.WriteLine(item.ToString());
            }

        }
    }
}
